<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <title>Article</title>
    <link rel='stylesheet' href='/stylesheets/style.css' />
    <link rel="stylesheet" href="/editormd/css/editormd.preview.min.css" />
  </head>
  <body>
    <div class="container">
      <h1>Article</h1>
      <div>
        <a href="/modify/<%=article.id %>">modify</a>
      </div>
      <div class="article">
          <div class="article-title"><%=article.title %></div>
          <div class="article-content" id="content">
            <textarea id="article-content-text" style="display:none;"><%= article.content %></textarea>
          </div>
      </div>
    </div>
    <script type="text/javascript" src="/javascripts/jquery-3.1.1.min.js"></script>
    <script src="/editormd/lib/marked.min.js"></script>
    <script src="/editormd/lib/prettify.min.js"></script>

    <script src="/editormd/lib/raphael.min.js"></script>
    <script src="/editormd/lib/underscore.min.js"></script>
    <script src="/editormd/lib/sequence-diagram.min.js"></script>
    <script src="/editormd/lib/flowchart.min.js"></script>
    <script src="/editormd/lib/jquery.flowchart.min.js"></script>

    <script type="text/javascript" src="/editormd/editormd.min.js"></script>
    <script>
      $(function(){
        var content=$("#article-content-text").text();
        editormd.markdownToHTML("content",{
          markdown        : content,
          htmlDecode      : "style,script,iframe",  // you can filter tags decode
          emoji           : true,
          taskList        : true,
          tex             : true,  // 默认不解析
          flowChart       : true,  // 默认不解析
          sequenceDiagram : true,  // 默认不解析
        });
      });
    </script>
  </body>
</html>
